package at.fhooe.swa.client.service.adapter;

import java.util.EventListener;

import at.fhooe.swa.client.service.event.IServiceListener;
import at.fhooe.swa.client.service.event.ServiceHistoryEvent;
import at.fhooe.swa.client.service.event.ServiceTrackEvent;

public interface IServiceAdapter extends Runnable {
	
	/**
	 * Request a something from the server. This is used to request the sensor histroy.
	 * @param dateFrom the date from which the sensor data shall be loaded from
	 * @param dateTo the date until when the sensor data should be loaded to
	 * @param sensor the sensor's name-key
	 */
	public void requestTracks(String dateFrom, String dateTo, String sensor);
	
	/**
	 * add a listener to the adapter
	 * @param listener an event listener that will be notified once an event is fired
	 * @see IServiceListener
	 * @see ServiceHistoryEvent
	 * @see ServiceTrackEvent
	 */
	public void addListener(EventListener listener);
	
	/**
	 * removes a listener.
	 * @param listener the listener to be removed
	 */
	public void removeListener(EventListener listener);
	
}
